#include <stdio.h>
int main()
{
    double num, sum = 0;
    scanf("%lf", &num);
    if (num <= 150)
        sum += num * 0.4463;
    else if (num > 150 && num <= 400)
    {
        sum += 150 * 0.4463;
        sum += (num - 150) * 0.4663;
    }
    else
    {
        sum += 150 * 0.4463;
        sum += (400 - 150) * 0.4663;
        sum += (num - 400) * 0.5663;
    }
    printf("%.1lf\n", sum);
    return 0;
}